# Contributor: Andy Hawkins <andy@gently.org.uk>
# Maintainer: Andy Hawkins <andy@gently.org.uk>
pkgname=py3-sly
pkgver=0.4
pkgrel=2
pkgdesc="Python implementation of lax and yacc"
url="https://github.com/dabeaz/sly"
arch="noarch"
license="BSD-3-Clause"
depends="
	python3
	"
makedepends="
	py3-setuptools
	"
checkdepends="
	py3-pytest
	py3-regex
	"
_commit="06b92e3e735db55b2d53db488785b2acc9d655ac"
source="sly-v$pkgver.tar.gz::https://github.com/dabeaz/sly/archive/$_commit.tar.gz"
builddir="$srcdir/sly-$_commit"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib" pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="79ee7262fbe961110021042873d1bc5541d70fa9eb5f9082838f8879d4a2956486eaa3300ce6c9a7f3ba4ce6d2c07355aac2887df67afb5eee87b741fac67c55  sly-v0.4.tar.gz"
